# 处理所有需要管理的路径

import os
from datetime import datetime


def root_path():
    """获取根目录"""
    root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__).replace("\\", "/")))
    return root_path


def get_excel_file():
    """获取excel文件目录"""
    return root_path() + "/data/测试用例完整版.xlsx"


def get_report_path():
    """获取报告的json路径"""
    return root_path() + "/report/json_report"


def get_env_path():
    """获取环境配置"""
    return root_path() + "/config/environment.ini"


def get_message_path():
    """获取消息通知的配置"""
    return root_path() + "/config/message.ini"

def get_slow_api_path():
    """慢接口存放的路径"""
    date = datetime.now().strftime("%Y%m%d %H_%M_%S")
    return root_path() + f"/slow_api/{date}api_requests.csv"

def get_mock_data_path():
    """获取mock文件存放的路径"""
    return root_path() + "/mock_server/mock_data.json"
